﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace BSCMFF.Web.UserControls
{
    /// <summary>
    /// Perspective seleciton.
    /// </summary>
    /// <remarks></remarks>
    public partial class SelectionPerspective : System.Web.UI.UserControl
    {
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        protected void Page_Load(object sender, EventArgs e)
        {
            RadComboBoxItem i = new RadComboBoxItem();
        }

        /// <summary>
        /// Gets the selected perspective.
        /// </summary>
        /// <remarks></remarks>
        public string SelectedPerspective
        {
            get
            {
                return RadComboBox1.SelectedItem.Text;
            }
        }

        /// <summary>
        /// Gets or sets the selected perspective ID.
        /// </summary>
        /// <value>The selected perspective ID.</value>
        /// <remarks></remarks>
        public int SelectedPerspectiveID
        {
            get
            {
                return Int32.Parse(RadComboBox1.SelectedValue);
            }
            set
            {
                if (value != 0)
                {
                    RadComboBox1.SelectedValue = value.ToString();
                }
            }
        }

        /// <summary>
        /// Gets or sets the db selected perspective ID.
        /// </summary>
        /// <value>The db selected perspective ID.</value>
        /// <remarks></remarks>
        public int? DbSelectedPerspectiveID
        {
            get
            {
                return Int32.Parse(RadComboBox1.SelectedValue);
            }
            set
            {
                if (value != null)
                {
                    RadComboBox1.SelectedValue = value.ToString();
                }
            }
        }
    }
}